package top.dingwen.io.treasure.sensitive.param;

import io.github.linpeilie.annotations.AutoMapper;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import top.dingwen.io.treasure.mybatisplus.annotation.QueryType;
import top.dingwen.io.treasure.mybatisplus.enums.QueryMode;
import top.dingwen.io.treasure.mybatisplus.param.BaseQueryParam;
import top.dingwen.io.treasure.sensitive.constant.WordsType;
import top.dingwen.io.treasure.sensitive.po.SensitiveWords;

import java.util.Date;

/**
 * WordsRequest : 敏感词请求对象
 *
 * @author dingwen
 * @since 2024/11/21 17:26
 */
@Getter
@Setter
@AutoMapper(target = SensitiveWords.class)
@AllArgsConstructor
public class WordsQueryParam extends BaseQueryParam {

    /**
     * 敏感词内容
     */
    @QueryType(value = QueryMode.FULL)
    private String wordsContent;

    /**
     * 敏感词类型
     * <p>
     *     <ul>
     *         <li>B:黑名单</li>
     *         <li>W:白名单</li>
     *     </ul>
     * </p>
     */
    @QueryType(value = QueryMode.EQ)
    private WordsType wordsType;

    /**
     * 创建时间起
     */
    @QueryType(value = QueryMode.RANGE, name = "gmtCreateEnd", columnName = "gmtCreateStart")
    private Date gmtCreateStart;

    /**
     * 创建时间止
     */
    private Date gmtCreateEnd;
}
